// 将form的校验函数绑定到el上，用于vialidChildForm函数校验子form
const directive = {
  mounted(el, binding, vnode, prevVnode) {
    el.validate = vnode.ctx.exposed.validate;
  },
  beforeUnmount(el, binding, vnode, prevVnode) {
    delete el.validate;
  },
};

if (!window.visualComp.directives['visual-form']) {
  window.visualComp.directives.push('visual-form');
  window.xVueWeb.app.directive('visual-form', directive);
}
